package com.xiaoma.pattern.proxy.jdk1;

import java.lang.reflect.Method;

/**
 * <p>Title: ICustomInterceptorImpl </p>
 * <p>Description：描述 </p>
 * <p>Package:com.xiaoma.pattern.proxy.jdk1 </p>
 * Date: 2022/5/26 12:25
 *
 * @author maj
 * @version 1.0.0
 */
public class ICustomInterceptorImpl implements ICustomInterceptor {

    @Override
    public void before(Method method, Object[] args) {
        System.out.println("登录之前:调用了"+method.getName()+"()方法");
    }

    @Override
    public void after(Method method, Object[] args) {
        System.out.println("登录之后:调用了"+method.getName()+"()方法");
    }

    @Override
    public void afterThrowing(Method method, Object[] args, Throwable throwable) {
        System.out.println("异常:调用了"+method.getName()+"()方法");
    }

    @Override
    public void afterFinally(Method method, Object[] args) {
        System.out.println("最后必须执行的:调用了"+method.getName()+"()方法");
    }
}
